import fang_office from '../src/data/business/fang_office.json';
import fang_office_rental from '../src/data/business/fang_office_rental.json';
import fang_rental from '../src/data/business/fang_rental (1).json';
import fang_shops_rental from '../src/data/business/fang_shops_rental.json';
export default {
  'GET  /getmanagement': fang_office,
  'GET  /getrental': fang_office_rental,
  'GET  /getshopsale': fang_rental,
  'GET  /getshoprental': fang_shops_rental,
  'GET  /getbusinessDetail': (req: any, res: any) => {
    const { id } = req.query;
    let editIndo = fang_office.RECORDS.find((item: any) => {
      if (item.id == id) {
        return item;
      }
    });
    res.send(editIndo);
  },
  'GET  /getbusinessDetail1': (req: any, res: any) => {
    const { id } = req.query;
    let editIndo = fang_office_rental.RECORDS.find((item: any) => {
      if (item.id == id) {
        return item;
      }
    });
    res.send(editIndo);
  },
  'GET  /getshopDetail': (req: any, res: any) => {
    const { id } = req.query;
    let editIndo = fang_rental.RECORDS.find((item: any) => {
      if (item.id == id) {
        return item;
      }
    });
    res.send(editIndo);
  },
  'GET  /getshopDetail1': (req: any, res: any) => {
    const { id } = req.query;
    let editIndo = fang_shops_rental.RECORDS.find((item: any) => {
      if (item.id == id) {
        return item;
      }
    });
    res.send(editIndo);
  },
};
